home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 128 16
/
q16.d81
/
t.c64 by 80
< prev
next >
Wrap
Text File
|
2022-08-28
|
6KB
|
116 lines
C 6 4 B Y 8 0
by Robert Rockefeller
C64 BY 80 is a program which allows C-128 users to make use of the
80-column VDC chip while in 64 mode. IT WILL NOT WORK ON A C-64. IT ONLY
WORKS ON A C-128 OR C-128D IN THE 64 MODE. It works by replacing the C-64's
built-in screen editor with a custom editor which uses the 80-column VDC
chip rather than the 40-column VIC chip. There is no Run It for this
program since you have to be in the 64 mode to LOAD and RUN it.
You can use C64 BY 80 to program and/or RUN BASIC 2.0 programs. The
program will install itself at hex address $C000 (49152), and replace the
standard Kernel CHRIN and CHROUT subroutines with its own versions. You can
use all the standard keys that you normally use in 64 mode such as HOME,
CLR, DEL, the CRSR keys, etc.
NOTE: What you can't use are any POKEs that you would normally use to
control text on the screen. This includes POKEing color memory, POKEing
characters to the screen, POKEing 199 to cause reverse printing, etc...
Control codes are the way to go here. Control codes specific to the VDC
chip will work, too. For instance, CTRL-O will cause flashing characters
and CTRL-B will cause underlined characters, which are features of the VDC
chip, not the computer. If your program prints data that scrolls on the
screen, make sure that you program in a pause capability. Pressing CONTROL,
which normally slows or pauses scrolling, doesn't work with C64 BY 80.
Also, if you use RAMLink, you may have trouble going into the 2MHZ mode
using the $c000 kernal routine.
In addition, a few extra functions are provided. In the list below, F1
E means to type and release the F1 function key, then type and release the E
key. CONTROL-A means to type the CONTROL key and the A key at the same
time. Don't enter SHIFTed keys. The commands below are in upper-case mode,
assuming that you will be programming in the upper-case mode.
F1 E : Make the cursor non-flashing.
F1 F : Make the cursor flash.
F1 S : Use a block cursor.
F1 U : Use an underline cursor.
F1 N : Put the screen into normal (non-reversed) mode.
F1 R : Put the screen into reverse video mode.
CONTROL-A : Move the cursor to the start of the line.
CONTROL-Z : Move the cursor to the end of the line.
CONTROL-V : Enter quote and/or insert mode.
CONTROL-X : Exit quote and/or insert mode.
CONTROL-D : Delete the line the cursor is on.
CONTROL-F : Insert a blank line at the cursor position.
CONTROL-O : Print flashing text.
CONTROL-P : Print the screen to the printer.
CONTROL-W : Move the cursor to the bottom left corner of the screen.
F3 : Display a help screen.
F7 : Delete the character under the cursor.
In addition to the extra key functions there are several subroutines
provided beginning at HEX address $C000. The subroutines can be used from
BASIC with the SYS command, or from machine language with a JSR. They are:
49152 : Enable C64 BY 80 by initializing the VDC chip, and re-directing the
Kernel CHROUT, and CHRIN vectors to C64 BY 80 subroutines.
49155 : Disable C64 BY 80.
49158 : Initialize the VDC chip by re-initializing the registers with
default values, and downloading the character set into VDC RAM.
49161 : Print (CHROUT) a character to the 80-column screen. The
Accumulator register must contain the character to be printed. The
character is always printed to the 80-column screen even if CMD or the
Kernal CHKOUT subroutine has been used to set output to another device.
49164 : Get a line (CHRIN) from the 80-column screen. The line is always
gotten from the 80-column screen even if the Kernal CHKIN subroutine has
been used to set input from another device.
49167 : Turn on the 80-column cursor. This function is useful for custom
INPUT routines.
49170 : Turn off the 80-column cursor. This function is useful for custom
INPUT routines.
49173 : Move the cursor to the specified coordinates. The X register
should contain the row number from 0 to 24. The Y register should contain
the column number from 0 to 79.
49176 : Read the cursor position. The X register will contain the row
number. The Y register will contain the column number.
49179 : Use the 40-column screen without disabling C64 BY 80.
49182 : Use the 80-column screen.
49185 : Set the CPU to 2 MHz clock speed.
49188 : Set the CPU to 1 MHz clock speed.
As you can see, C64 BY 80 allows you to do things in the 64 mode that
you have taken for granted in the 128 80-column mode. Of course there are
some 64 commands that won't work on the 80-column screen. For instance,
don't use POKE214,X to position the cursor; use SYS49173. The whole $C000
area is used by C64 BY 80 so you must put ML and data elsewhere.
RR
FENDER'S NOTE: This unusual program was published on LOADSTAR #97 for the
C-64, even though it won't run on a C-64. It's a tricky thing to justify --
a program that works in the 64 mode but only on a C-128 -- but I feel it's
something that we all should have. You can work on a 64 program but use the
added capabilities of the 80-column editing screen. You can write an
80-column program but use the larger library of 64 ML routines. I'm sure
other uses of this program will occur to you as time goes by. In any case,
it's small and fits nicely into the remaining blocks left on Side Two.
Don't forget C64 BY 80, it may come in handy.
***** End of Text *****